//
//  DMLiuYanViewController.m
//  DMGME
//
//  Created by MC on 15/10/28.
//  Copyright © 2015年 GYP. All rights reserved.
//

#import "DMLiuYanViewController.h"

@interface DMLiuYanViewController ()
@property (nonatomic,strong)  UILabel *text;

@end

@implementation DMLiuYanViewController

-(void)viewWillAppear:(BOOL)animated
{
    _text.hidden = NO;
}

-(void)viewWillDisappear:(BOOL)animated
{
    _text.hidden = YES;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.conversationType = RC_CHAT_INPUT_BAR_STYLE_SWITCH_CONTAINER_EXTENTION;
    
    _text = [[UILabel alloc] initWithFrame: CGRectMake(KWidth/2-30, 15, 60, 21)];
    _text.textColor = [UIColor whiteColor];
    _text.textAlignment = NSTextAlignmentCenter;
    _text.font = [UIFont boldSystemFontOfSize:17];
    _text.text = self.userName;
    [self.navigationController.navigationBar addSubview:_text];
    
    UIButton *left = [UIButton buttonWithType:UIButtonTypeCustom];
    
    left.frame = CGRectMake(0, 10, 15, 21);
    
    [left setImage:[UIImage imageNamed:@"fanhui_03 2"] forState:UIControlStateNormal];
    
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:left];
    
    [left addTarget:self action:@selector(goBackBtton) forControlEvents:UIControlEventTouchUpInside];
}
-(void)goBackBtton
{
    [self.navigationController popViewControllerAnimated:YES];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
